Skip to content

Add Raspberry Pi 5 performance testing environment setup#1

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/setup-scripts-raspberry-pi-5
Draft

Add Raspberry Pi 5 performance testing environment setup#1
Copilot wants to merge 2 commits intomainfrom
copilot/setup-scripts-raspberry-pi-5

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 9, 2026

Bootstraps a Raspberry Pi 5 as a self-hosted GitHub Actions performance node: Docker-containerised benchmarks, a custom HAT for GP2040-CE input-latency measurement, and workflows that publish results back to GitHub.

Setup Scripts (scripts/)

  • setup.sh — orchestrator; accepts --skip-docker, --skip-runner, --skip-hat, --runner-url, --runner-token
  • setup-system.sh — OS packages, CPU governor → performance, swap off, sysctl network tuning, NTP, hostname
  • setup-docker.sh — Docker Engine via official Debian repo, daemon.json with overlay2 + BuildKit, adds user to docker group
  • setup-github-runner.shgithub-runner system user, ARM64 runner binary, systemd unit with labels self-hosted,Linux,ARM64,raspberry-pi-5,performancenode
  • setup-hat.sh — Python venv (RPi.GPIO, gpiozero, lgpio), udev rules for GPIO and GP2040-CE USB (VID 0x2E8A), dtparam overlays in /boot/firmware/config.txt

Docker Benchmark Containers (docker/)

Multi-stage debian:bookworm-slim image with separate targets for wrk, iperf3, stress-ng, and sysbench. Each entrypoint emits a structured JSON result file. Compose profiles (http, network, stress, cpu, memory, io) enable targeted local runs.

GP2040-CE Latency HAT (hat/)

latency_test.py drives GPIO 17 to trigger a button press on the connected GP2040-CE device, waits for the round-trip signal on GPIO 4, and collects configurable samples (default 1 000 + 50 warmup). Outputs min/max/mean/median/stdev/p95/p99 as JSON.

# Core measurement loop
GPIO.output(trigger_pin, GPIO.HIGH)
t0 = time.perf_counter()
while (time.perf_counter() - t0) < timeout_sec:
    if GPIO.input(signal_pin) == GPIO.HIGH:
        latency_ms = (time.perf_counter() - t0) * 1000.0
        break

Pin config lives in hat/config/hat-config.json (BCM 4 = signal in, 17 = trigger out, 27 = status LED).

GitHub Actions Workflows (.github/workflows/)

Workflow Schedule Runner label
performance-test.yml Daily 02:00 UTC performancenode
latency-test.yml Daily 03:00 UTC performancenode

Both support workflow_dispatch for manual runs with parameter overrides. Results uploaded as artifacts (benchmarks 90 days, latency 365 days) with a markdown stats table written to the run summary. Explicit permissions: contents: read / actions: write blocks on all jobs.

Original prompt

This will houses the setup scripts for a Raspberry Pi 5 to run as a dedicated performance testing environment for applications inside docker containers, as well as having a custom HAT that will allow for latency testing of the GP2040-CE project. All of these performance tests will be run as GitHub Actions on the local Pi, reporting their results on GitHub.

Copilot AI changed the title [WIP] Add setup scripts for Raspberry Pi 5 performance testing Add Raspberry Pi 5 performance testing environment setup Apr 9, 2026
Copilot AI requested a review from Fortinbra April 9, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants